package edu.hubu.book.domain;

import java.io.Serializable;
import java.util.List;

/**
 * 分页类, 储存分页信息
 *
 * @author waxijiang
 */
public class Page implements Serializable {
    /**
     * 每页书的数量
     */
    private int pageSize;
    /**
     * 当前页数
     */
    private int currentPage;
    /**
     * 当前页的书籍列表
     */
    private List<ExtendBook> bookList;
    /**
     * 总页数
     */
    private int totalPage;
    /**
     * 查询总结果数
     */
    private int resultCount;

    public Page(int pageSize, int currentPage, List<ExtendBook> bookList, int totalPage, int resultCount) {
        this.pageSize = pageSize;
        this.currentPage = currentPage;
        this.bookList = bookList;
        this.totalPage = totalPage;
        this.resultCount = resultCount;
    }

    @Override
    public String toString() {
        return "Page{" + "pageSize=" + pageSize + ", currentPage=" + currentPage + ", bookList=" + bookList + ", totalPage=" + totalPage + ", resultCount=" + resultCount + '}';
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(int currentPage) {
        this.currentPage = currentPage;
    }

    public List<ExtendBook> getBookList() {
        return bookList;
    }

    public void setBookList(List<ExtendBook> bookList) {
        this.bookList = bookList;
    }

    public int getTotalPage() {
        return totalPage;
    }

    public void setTotalPage(int totalPage) {
        this.totalPage = totalPage;
    }

    public int getResultCount() {
        return resultCount;
    }

    public void setResultCount(int resultCount) {
        this.resultCount = resultCount;
    }
}
